#!/usr/bin/webif-page
<? 
. /usr/lib/webif/webif.sh
load_settings charon
. /etc/default/charon

header "Charon" "mikolaj.cx" "@TR<<mikolaj.cx Account>>" '' "$SCRIPT_NAME"

if ! empty $FORM_balance; then
	cat <<EOF
<FORM>
<TABLE><TR>
<TD VALIGN="center">Account Balance</TD>
<TD><TEXTAREA ROWS=3 COLS=15>
`mcx balance`
</TEXTAREA></TD>
</TR></TABLE>
</FORM>
EOF
fi

if ! empty $FORM_history; then
	cat <<EOF
<FORM>
<TEXTAREA ROWS=6 COLS=60>
   Date      Time        Amount    Auth    Draw
`mcx history`
</TEXTAREA>
</FORM>
EOF
fi

display_form <<EOF
start_form|@TR<<Queries>>
submit|balance|@TR<<Account Balance>>
submit|history|@TR<<Transaction History>>
end_form
EOF


echo "${ERROR}"
?>


<!--
##WEBIF:name:Charon:2:mikolaj.cx
-->
